Optimal. Leaf size=33 \[ \frac{7}{4} \log \left (x^2-8 x+21\right )-\frac{13 \tan ^{-1}\left (\frac{4-x}{\sqrt{5}}\right )}{\sqrt{5}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0221802, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {634, 618, 204, 628} \[ \frac{7}{4} \log \left (x^2-8 x+21\right )-\frac{13 \tan ^{-1}\left (\frac{4-x}{\sqrt{5}}\right )}{\sqrt{5}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{-2+7 x}{42-16 x+2 x^2} \, dx &=\frac{7}{4} \int \frac{-16+4 x}{42-16 x+2 x^2} \, dx+26 \int \frac{1}{42-16 x+2 x^2} \, dx\\ &=\frac{7}{4} \log \left (21-8 x+x^2\right )-52 \operatorname{Subst}\left (\int \frac{1}{-80-x^2} \, dx,x,-16+4 x\right )\\ &=-\frac{13 \tan ^{-1}\left (\frac{4-x}{\sqrt{5}}\right )}{\sqrt{5}}+\frac{7}{4} \log \left (21-8 x+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0125885, size = 35, normalized size = 1.06 \[ \frac{1}{2} \left (\frac{7}{2} \log \left (x^2-8 x+21\right )+\frac{26 \tan ^{-1}\left (\frac{x-4}{\sqrt{5}}\right )}{\sqrt{5}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 29, normalized size = 0.9 \begin{align*}{\frac{7\,\ln \left ({x}^{2}-8\,x+21 \right ) }{4}}+{\frac{13\,\sqrt{5}}{5}\arctan \left ({\frac{ \left ( 2\,x-8 \right ) \sqrt{5}}{10}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.52334, size = 35, normalized size = 1.06 \begin{align*} \frac{13}{5} \, \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right ) + \frac{7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.52322, size = 92, normalized size = 2.79 \begin{align*} \frac{13}{5} \, \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right ) + \frac{7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.135162, size = 39, normalized size = 1.18 \begin{align*} \frac{7 \log{\left (x^{2} - 8 x + 21 \right )}}{4} + \frac{13 \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} x}{5} - \frac{4 \sqrt{5}}{5} \right )}}{5} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22752, size = 35, normalized size = 1.06 \begin{align*} \frac{13}{5} \, \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right ) + \frac{7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]